﻿using Microsoft.Office.Interop.Excel;
using Microsoft.Office.Tools.Ribbon;

namespace VSTODemo {
    public partial class Ribbon1 {
        private Application excelApp;
        private System.Windows.Forms.Form sqlForm = null;
        
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e) {
            excelApp = Globals.ThisAddIn.Application;
        }

        private void btnImport_Click(object sender, RibbonControlEventArgs e) {
            if (sqlForm == null) {
                sqlForm = new SqlForm();
            }
            sqlForm.ShowDialog();           
        }

        private void btnSAPTable_Click(object sender, RibbonControlEventArgs e) {
            var sapTableForm = new SAPTableForm();
            sapTableForm.ShowDialog();
        }
    }
}
